
import request from "../utils/request"
import store from "../store"
export const login =(data)=>{
    return request({
        method:"post",
        url:"/user/login",
        data:data
    })
}

export const getUserInfo=(id)=>{
    return request({
        method:'get',
        url:"/userInfo/get",
        params:{userId:id},
        headers:{
            Authorization:`Bearer ${store.state.user.myToken}`
        }
    })
}

export const getUserChaneels=()=>{
    return request({
        method:"get",
        url:"/user/channels"
    })
}

export const getCurrentChannels=(id)=>{
    return request({
        method:"get",
        url:"/user/currentChannels",
        params:{userId:id}
    })
}


